package com.meida.module.bus.client.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.meida.common.mybatis.annotation.TableAlias;
import com.meida.common.mybatis.base.entity.AbstractEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 预留发货记录表
 *
 * @author flyme
 * @date 2020-12-02
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("bus_receipt_delivery_record")
@TableAlias("brdr")
@ApiModel(value = "BusReceiptDeliveryRecord对象", description = "预留发货记录表")
@ToString
public class BusReceiptDeliveryRecord extends AbstractEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主key")
    @TableId(value = "recDecId", type = IdType.AUTO)
    private Long recDecId;

    @ApiModelProperty(value = "出库申请ID")
    private Long recDecReqId;

    @ApiModelProperty(value = "材料申请明细ID")
    private Long purchaseDetailsId;

    @ApiModelProperty(value = "版本固定值 100 200")
    private String ver;

    @ApiModelProperty(value = "材料计划表ID")
    private Long materialPlanId;

    @ApiModelProperty(value = "材料主表ID")
    private Long materialId;

    @ApiModelProperty(value = "状态")
    private String syncStatus;

    @ApiModelProperty(value = "项目ID")
    private Long projectId;

    @ApiModelProperty(value = "项目代码")
    private String projectCode;

    @ApiModelProperty(value = "项目名称")
    private String projectName;

    @ApiModelProperty(value = "专业代码")
    private String majorCode;

    @ApiModelProperty(value = "专业名称")
    private String majorName;

    @ApiModelProperty(value = "工程包代码")
    private String packageNo;

    @ApiModelProperty(value = "工程包名称")
    private String packageName;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "申请人")
    private String userName;

    @ApiModelProperty(value = "申请时间")
    private Date appTime;

    @ApiModelProperty(value = "本次采购数量")
    private BigDecimal purchaseNum;

    @ApiModelProperty(value = "在途数量")
    private BigDecimal onLineNum;

    @ApiModelProperty(value = "到货数量")
    private BigDecimal receiveNum;

    @ApiModelProperty(value = "需求计划日期")
    private Date receivedDate;

    @ApiModelProperty(value = "供应商ID")
    private Long vendorId;

    @ApiModelProperty(value = "发料ID号_SAP")
    private Long zid;

    @ApiModelProperty(value = "发料行项目_SAP")
    private int zitem;

    @ApiModelProperty(value = "A07：发料，A03：取消发料_SAP")
    private String action;

    @ApiModelProperty(value = "凭证中的过帐日期_SAP")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date budat;

    @ApiModelProperty(value = "凭证中的凭证日期_SAP")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date bldat;

    @ApiModelProperty(value = "证抬头文本_SAP")
    private String bktxt;

    @ApiModelProperty(value = "班组编码_收货方_SAP")
    private String supplierCode;

    @ApiModelProperty(value = "班组名称")
    private String supplierName;

    @ApiModelProperty(value = "本次领料量_以录入项单位表示的数量_SAP")
    private BigDecimal deliveryNumThis;

    @ApiModelProperty(value = "可冲销数量")
    private BigDecimal charOffCountCan;

    @ApiModelProperty(value = "预留/相关需求的编号_SAP")
    private String reserveNo;

    @ApiModelProperty(value = "预留 / 相关需求的项目编号_SAP")
    private String reserveRow;

    @ApiModelProperty(value = "库存地点_SAP")
    private String lgort;

    @ApiModelProperty(value = "扩展字段1_SAP")
    private String ext01;

    @ApiModelProperty(value = "扩展字段2_SAP")
    private String ext02;

    @ApiModelProperty(value = "扩展字段3_SAP")
    private String ext03;

    @ApiModelProperty(value = "扩展字段4_SAP")
    private String ext04;

    @ApiModelProperty(value = "扩展字段5_SAP")
    private String ext05;

    @ApiModelProperty(value = "消息类型_SAP回调")
    private String msgtyFromSap;

    @ApiModelProperty(value = "消息文本_SAP回调")
    private String msgtxFromSap;

    @ApiModelProperty(value = "物料凭证编号_SAP回调")
    private String mblnrFromSap;

    @ApiModelProperty(value = "物料凭证中的项目_SAP回调")
    private int mblpoFromSap;

    @ApiModelProperty(value = "物料凭证的年份_SAP回调")
    private int mjahrFromSap;

    @ApiModelProperty(value = "材料WBS代码")
    private String materialWbsCode;

    @ApiModelProperty(value = "物料代码")
    private String materialCode;

    @ApiModelProperty(value = "领料申请人ID")
    private Long recDelAppUserId;

    @ApiModelProperty(value = "领料申请人")
    private String recDelAppUserName;

    @ApiModelProperty(value = "删除flg")
    private int delFlg;

    @ApiModelProperty(value = "出库申请人ID")
    private Long createUserId;

    @ApiModelProperty(value = "出库申请人")
    private String createUserName;

    @ApiModelProperty(value = "出库申请确认人ID")
    private Long confUserId;

    @ApiModelProperty(value = "出库申请确认人")
    private String confUserName;

    @ApiModelProperty(value = "班组编码_只记录")
    private String supplierCodeForRecord;

    @ApiModelProperty(value = "班组名称_只记录")
    private String supplierNameForRecord;
}
